/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.factory.server.bo;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 *
 * @author milos
 */
@Entity
@Table(name = "user_task")
public class UserTask extends AbstractBusinessObject {

    @Basic(optional = false)
    @Column(name = "problem_id")
    private String problemId;
    @Basic(optional = false)
    @Column(name = "user_id")
    private String userId;
    @Basic(optional = false)
    @Column(name = "input_id")
    private String inputId;
    @Column(name = "done")
    private boolean done;
    @Column(name = "note")
    private String note;

    public UserTask() {
    }

    public UserTask(String inputId, String problemId, String userId, boolean done) {

        this.inputId = inputId;
        this.problemId = problemId;
        this.userId = userId;
        this.done = done;
    }

    public String getInputId() {
        return inputId;
    }

    public void setInputId(String inputId) {
        this.inputId = inputId;
    }

    public String getProblemId() {
        return problemId;
    }

    public void setProblemId(String problemId) {
        this.problemId = problemId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public boolean getDone() {
        return done;
    }

    public void setDone(boolean done) {
        this.done = done;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof UserTask)) {
            return false;
        }
        UserTask other = (UserTask) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.factory.server.bo.UserTask[ id=" + id + " ]";
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }  
    
}
